<?php

namespace app\admin\model\device;

use think\Model;


class Air extends Model
{

    

    

    // 表名
    protected $name = 'air';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];


    public function getMode()
    {
        return ['0' => __('自动'), '1' => __('制冷'), '2' => __('制热'), '3' => __('除湿'), '4' => __('送风')];
    }

    public function table()
    {
        return $this->belongsTo('app\admin\model\Shoptable', 'table_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }



    public function shop()
    {
        return $this->belongsTo('app\admin\model\Shop', 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
